package br.com.emersondeandrade.aplicacao.mobile;

import javax.servlet.http.Cookie;

import br.com.emersondeandrade.infraEstrutura.propriedadesSistema.PropriedadesSistemaServiceStatic;

public class CookiesService {
	
	
	public static final String COOKIE_NAME = PropriedadesSistemaServiceStatic.getValue(PropriedadesSistemaServiceStatic.Key.COOKIE_NAME);
	
	
	public static String getValue(String cookieName, Cookie[] cookies){
		
		for(Cookie cookie : cookies){
			if (cookie.getName().equals(cookieName) ){
				return cookie.getValue(); 
			}
		}
		
		return null;
	}	
		
	

}
